import pro.Dog;
import pro.Master;
import pro.Penguin;
import pro.Pet;

import java.util.HashMap;
import java.util.Map;
import java.util.Scanner;

/**
 * @Description: TODO
 * @author: muxiongxiong
 * @date: 2021年06月30日 18:41
 * 公众号：雄雄的小课堂
 * 博客：https://blog.csdn.net/qq_34137397
 */
public class TestMain {
    static Scanner sc = new Scanner(System.in);

    public static void main(String[] args) {
        test6();

    }

    //测试构造方法
    public static void test2() {
        Dog d = new Dog("旺财", 100, 12, "哈士奇");
        d.show();
        Penguin p = new Penguin("企鹅", 100, 12, "哈士奇");
        p.show();
        //Pet pet = new Pet();
    }

    public static void test3() {
        //分别实例化主任、狗狗和企鹅
        Dog dog = new Dog("旺财", 100, 100, "哈士奇");
        Penguin penguin = new Penguin("企鹅", 100, 100, "男");
        Master master = new Master("老王", 100);
        master.feed(dog);
        master.feed(penguin);

        Pet p = new Dog();
        p.eat();
        Pet pe = new Penguin();
        pe.eat();
    }

    public static void test4() {
//        Master master = new Master();
//        master.feedEat(new Dog());
//        master.feedEat(new Penguin());
        /*Pet pet = new Dog();
        Dog dog = (Dog)pet;
        dog.play();
        Pet pet1 = new Penguin();
        Penguin penguin = (Penguin) pet1;
        penguin.swimer();*/

        Pet p = new Dog();
        p.eat();
        if (p instanceof Dog) {
            Dog dog = (Dog) p;
            dog.play();
        } else if (p instanceof Penguin) {
            Penguin penguin = (Penguin) p;
            penguin.swimer();
        }
    }

    static void test5() {
        /*UsbInterface usbInterface = new UDisk();
        usbInterface.service();
        UsbInterface usbInterface1 = new UsbFan();
        usbInterface1.service();*/

       /* MoHe mohe = null;
        ZhiZhang zhiZhang = null;
        Printer printer = new Printer();
        mohe = new CaiSe();
        zhiZhang = new A4zhi();
        printer.dayin(mohe,zhiZhang);*/

        /*GongChengShi gongChengShi = new GongChengShi("老王");
        gongChengShi.writeCode();
        gongChengShi.talkYewu();*/

    }

    static void test6() {
        Map map = new HashMap();
        map.put("一", "壹");
        map.put("二", "贰");
        map.put("三", "叁");

        for (Object o : map.keySet()) {
            System.out.println(map.get(o));
        }
    }
}
